package util.loaders;

import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;

public class ImageLoader {

	protected final DataLoader dataSource;
	
	public ImageLoader(DataLoader dataSource){
		this.dataSource = dataSource;
	}
	
	public BufferedImage load(String name) throws IOException{
		return ImageIO.read(dataSource.load(name));
	}
	
}
